console.log('script start');//
async function async1() {
  await async2()
  console.log('async1 end');//由于await代码执行，所以该行代码去到了微任务队列 
}
async function async2() {
  console.log('async2 end');//
}
async1()
setTimeout(() => {
  console.log('setTimeout');//8
}, 0)
new Promise((resolve, reject) => {
  console.log('promise');//3
  resolve()
})
.then(() => {
  console.log('then1');//6
})
.then(() => {
  console.log('then2');//7
});
console.log('script end');//4

// script start
// async1 end xxx
// promise
// script end
// async2 end x
// then1
// then2
// setTimeout